home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17027 < prev    next >
Encoding:
Text File  |  1996-08-05  |  818 b   |  31 lines

  1. Path: newsbf02.news.aol.com!not-for-mail
  2. From: bdp0868@aol.com (BDP0868)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Default Constructors
  5. Date: 13 Apr 1996 01:26:39 -0400
  6. Organization: America Online, Inc. (1-800-827-6364)
  7. Sender: root@newsbf02.news.aol.com
  8. Message-ID: <4knduf$5ct@newsbf02.news.aol.com>
  9. References: <316F2B88.5FC4@psych.stanford.edu>
  10. Reply-To: bdp0868@aol.com (BDP0868)
  11. NNTP-Posting-Host: newsbf02.mail.aol.com
  12.  
  13. Hi Nick-
  14.   The problem here is that your constructor is private (the default) which
  15. means it is not accessible to your "Object" class.  You will almost always
  16. want your constructors to be public.  If you change class position to
  17.  
  18. class Position {
  19.   public:
  20.     Position(){x=y=z=0;}
  21.   private:
  22.     blah, blah, blah
  23. }
  24.  
  25. you will se much better results!
  26.  
  27. Good Luck.
  28.  
  29. Brad Peterson
  30. bdp0868@aol.com
  31.